/**
 * 
 */
package fecat.thread;

import com.anh.oddy.client.message.QuoteResponse;

import fecat.entities.QuoteModel;
import fecat.eventcenter.EventArgs;
import fecat.eventcenter.EventCommandString;
import fecat.eventcenter.EventManager;
import fecat.services.log.LoggingService;
import fecat.services.server.ExchangeService;

/**
 * @author ibm
 *
 */
public class Quote2Thread extends Thread {
	public void run(){
		try{
			while(true){
				QuoteModel[] qms=ExchangeService.popQuoteResponse();
				if(qms==null ||qms.length==0){
					
				}
				else{
					EventArgs arg=new EventArgs();
					arg.setEventName(EventCommandString.exchangeRateQuote);
					arg.setEventParm(qms);
					EventManager.sendServerMessager(arg);
				}
				
			}
		}
		catch(Exception ex){
			LoggingService.error(ex);
		}
	}
}
